<?php

 define('ACC',true);
require('./include/init.php');

  //接收
$cate['catename'] = $_POST['catename'];
$cate['intro'] = $_POST['intro'];

// 关于名称的检测，如有重复，此处不演示


//调用model,来执行
$cateModel = new CateModel();
 if($cateModel->add($cate)){
    $res = true;
 }else{
     $res = false;
 }

//把结果展示到view里去

 echo $res?'成功':'失败';

?>